import Vue from 'vue'
import App from './App.vue'
import router from './router'
import './plugins/element.js'
import axios from 'axios'
import qs from 'qs'
import * as echarts from 'echarts'


// 设置 axios 请求的基本路径
axios.defaults.baseURL='http://192.168.0.100:80/';

// 设置 axios 请求，每次请求头携带token
axios.interceptors.request.use( config => {
    var token = sessionStorage.getItem("token");
    if (token) {
        config.headers.Token=token;
    }
    return config;
});
Vue.prototype.$echarts = echarts
Vue.prototype.$axios = axios;
Vue.prototype.$qs = qs;

Vue.config.productionTip = false;


new Vue({
  router,
  render: h => h(App)
}).$mount('#app');
